<include file="head"/>
                <div class="m-table-box">
                    <div class="form-box">
                        <div class="link-box">
                            <p>下列网址为您的代理推广网址</p> 
                            <div class="clearfix" id="clip_container">
                                <input name="Fcode" onFocus="this.select()" type="text" id="AgentUrl" onChange="clip.setText(this.value)" value="{$url}" class="form-input link-input fl">
                                <a href="javascript:void(0);" data-clipboard-action="copy" data-clipboard-target="#AgentUrl" id="d_clip_button" onclick="copy();" onmouseover="copy();" class="link-button">点击复制网址</a></div>
                        </div>
                    </div>
                </div>
            </div>
        </div> 
        <script src="__HOME_CSS__/agent/js/jquery-1.js"></script>
        <!-- <script src="__HOME_CSS__/js/socket.io.js"></script>
        <script src="__HOME_CSS__/js/sendSms.js"></script> -->
        <script src="__HOME_CSS__/agent/js/layer.js"></script>
        <!-- <script src="__HOME_CSS__/js/main.js"></script>
        <script src="__HOME_CSS__/js/index.js"></script> -->
        <script src="__HOME_CSS__/agent/js/ZeroClipboard.js"></script>
        <script src="__HOME_CSS__/agent/js/jquery.browser.js"></script>
        <script type="text/javascript">
            //startLoad();

            function copy(){
                if ($.browser.mobile) {
                        layer.alert("没有权限获取手机的剪切版信息，请手动复制！");
                    } else {
                    var clip = new ZeroClipboard.Client();   //实例化对象

                    ZeroClipboard.setMoviePath("__HOME_CSS__/agent/js/ZeroClipboard.swf");
                    clip.setText($("#AgentUrl").val());
                    clip.addEventListener('complete', function (client, text) {
                        layer.alert("复制成功");
                    });
                    clip.glue("d_clip_button");
                }
            }
            
            function startLoad(){
                $.post("/app/member/agent/geturl",{r: Math.random()},function(data){
                    if(data.status<=0){
                        layer.alert(data.info);
                        return false;
                    }else{
                        var url = data.list.url;
                        if(url)
                            $("#AgentUrl").val(url);
                    }
                },"json");
            }

            function goIndex(){
                window.location.href = "index.html";
            }

            function salfOut(){
                // $.post("/app/member/index/loginOut",{t:Math.random()},function(data){
                //     if(data.status<=0){
                //         layer.alert(data.info);
                //         return false;
                //     }else{
                //         window.location.href="/agent/login.html";
                //     }
                // },"json");
                window.location.href="login.html";
            }
        </script>
    </body>
</html>